<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>

<script type="text/javascript" src="./js/ADM003.js"></script>
<script type="text/javascript" src="./js/common.js"></script>
<script type="text/javascript" src="./js/jquery.js"></script>

<f:view beforePhase="#{userManaged.initPage}">
	<jsp:include page="header.jsp" />
	<!-- Begin vung input -->
	<h:form id="formADM003">
		<h:inputHidden value="#{userManaged.userId}" />
		<h:inputHidden value="#{userManaged.detailUserJapanId}">
		</h:inputHidden>
		<table id="table" class="tbl_input" border="0" width="75%"
			cellpadding="0" cellspacing="0">
			<tr>
				<th align="left" style="padding-left: 100px;"><h:outputText
					value="会員情報編集"></h:outputText></th>
			</tr>
			<tr>
				<td class="errMsg">
				<div style="padding-left: 120px">&nbsp; <font color="red">
				<h:messages showSummary="false" showDetail="true" style="color:red;" />
				<c:if test="${!(empty userManaged.lsErrorMessage) }">
					<h:messages showSummary="false" showDetail="true" />
					<c:forEach var="err" items="${userManaged.lsErrorMessage}">
						<c:out value="${err}"></c:out>
						<br />
					</c:forEach>
				</c:if> </font></div>
				</td>
			</tr>
			<tr>
				<td align="left">
				<div style="padding-left: 100px;">
				<table border="0" class="tbl_input" cellpadding="4" cellspacing="0">
					<tr>
						<td class="lbl_left"><font color="red">*</font><h:outputText
							value=" アカウント名:" /></td>
						<td><c:choose>
							<c:when test="${userManaged.userId > 0}">
								<h:inputText style="txBox" required="true" size="15" id="アカウント名"
									label="アカウント名" value="#{userManaged.loginName}" readonly="true">
								</h:inputText>
								<t:saveState value="#{userManaged.loginName}" />
							</c:when>
							<c:otherwise>
								<h:inputText style="txBox" required="true" size="15" id="アカウント名"
									label="アカウント名" value="#{userManaged.loginName}"
									onfocus="this.style.borderColor='#0066ff';"
									onblur="this.style.borderColor='#aaaaaa';">
									<f:validator validatorId="checkLoginName" />
								</h:inputText>
							</c:otherwise>
						</c:choose></td>
					</tr>
					<tr>
						<td class="lbl_left"><font color="red">*</font><h:outputText
							value=" グループ:" /></td>
						<td><h:selectOneListbox size="1" label="グループ"
							value="#{userManaged.groupId}" required="true">
							<f:selectItems value="#{userManaged.lsItemGroup}" />
						</h:selectOneListbox> <t:saveState value="#{userManaged.lsItemGroup}" /> <span>&nbsp;&nbsp;&nbsp;</span></td>
					</tr>
					<tr>
						<td class="lbl_left"><font color="red">*</font><h:outputText
							value=" 氏名:" /></td>
						<td><h:inputText style="txBox" size="30" label="氏名"
							value="#{userManaged.fullName}" required="true"
							onfocus="this.style.borderColor='#0066ff';"
							onblur="this.style.borderColor='#aaaaaa';">
						</h:inputText></td>
					</tr>
					<tr>
						<td class="lbl_left"><h:outputText value=" カタカナ氏名:" /></td>
						<td><h:inputText style="txBox" size="30"
							value="#{userManaged.fullNameKana}" label="カタカナ氏名"
							onfocus="this.style.borderColor='#0066ff';"
							onblur="this.style.borderColor='#aaaaaa';">
							<f:validator validatorId="checkNameKana" />
						</h:inputText></td>
					</tr>
					<tr>
						<td class="lbl_left"><font color="red">*</font><h:outputText
							value=" 生年月日:" /></td>
						<td align="left"><h:selectOneListbox size="1"
							value="#{userManaged.birthdayYear}">
							<f:selectItems value="#{userManaged.lsItemBirthdayYear}" />
						</h:selectOneListbox>年 <h:selectOneListbox size="1"
							value="#{userManaged.birthdayMonth}">
							<f:selectItems value="#{userManaged.lsItemBirthdayMonth}" />
						</h:selectOneListbox>月 <h:selectOneListbox size="1" value="#{userManaged.birthdayDay}">
							<f:selectItems value="#{userManaged.lsItemBirthdayDay}" />
						</h:selectOneListbox>日</td>
					</tr>
					<tr>
						<td class="lbl_left"><font color="red">*</font><h:outputText
							value=" メールアドレス:" /></td>
						<td align="left"><h:inputText style="txBox" size="30"
							label="メールアドレス" value="#{userManaged.email}" required="true"
							onfocus="this.style.borderColor='#0066ff';"
							onblur="this.style.borderColor='#aaaaaa';">
							<f:validator validatorId="checkEmail" />
						</h:inputText></td>
					</tr>
					<tr>
						<td class="lbl_left"><font color="red">*</font><h:outputText
							value=" 電話番号:" /></td>
						<td align="left"><h:inputText style="txBox" size="30"
							label="電話番号" value="#{userManaged.tel}" required="true"
							onfocus="this.style.borderColor='#0066ff';"
							onblur="this.style.borderColor='#aaaaaa';">
							<f:validator validatorId="checkTel" />
						</h:inputText></td>
					</tr>
					<tr>
						<td class="lbl_left"><font color="red">*</font><h:outputText
							value=" パスワード:" /></td>
						<td align="left"><h:inputSecret style="txBox" size="30"
							label="パスワード" value="#{userManaged.password}" required="true"
							redisplay="true" onfocus="this.style.borderColor='#0066ff';"
							onblur="this.style.borderColor='#aaaaaa';">
							<f:validator validatorId="checkPassword" />
						</h:inputSecret></td>
					</tr>
					<tr>
						<td class="lbl_left"><h:outputText value=" パスワード（確認）:" /></td>
						<td align="left"><h:inputSecret style="txBox" size="30"
							value="#{userManaged.passwordConfirm}"
							onfocus="this.style.borderColor='#0066ff';"
							onblur="this.style.borderColor='#aaaaaa';">
						</h:inputSecret></td>
					</tr>
					<tr>
						<th align="left" colspan="2"><a href="#"
							onclick="loadData('itemCodeLevel','${userManaged.codeLevel}')">日本語能力</a>
						</th>
					</tr>
				</table>
				<div id="jp_detail_data" style="display: none">
				<table>
					<tr>
						<td class="lbl_left"><h:outputText value=" 資格:" /></td>
						<td align="left"><h:selectOneListbox size="1" label="資格"
							id="itemCodeLevel" value="#{userManaged.codeLevel}">
							<f:selectItems value="#{userManaged.lsItemJapan}" />
						</h:selectOneListbox></td>
					</tr>
					<tr>
						<td class="lbl_left"><h:outputText value=" 資格交付日:" /></td>
						<td align="left"><h:selectOneListbox size="1"
							id="itemStartYear" value="#{userManaged.startYear}">
							<f:selectItems value="#{userManaged.lsItemStartYear}" />
						</h:selectOneListbox>年 <h:selectOneListbox id="itemStartMonth" size="1"
							value="#{userManaged.startMonth}">
							<f:selectItems value="#{userManaged.lsItemStartMonth}" />
						</h:selectOneListbox>月 <h:selectOneListbox id="itemStartDay" size="1"
							value="#{userManaged.startDay}">
							<f:selectItems value="#{userManaged.lsItemStartDay}" />
						</h:selectOneListbox>日</td>
					</tr>
					<tr>
						<td class="lbl_left"><h:outputText value=" 失効日:" /></td>
						<td align="left"><h:selectOneListbox size="1"
							id="itemEndYear" value="#{userManaged.endYear}">
							<f:selectItems value="#{userManaged.lsItemEndYear}" />
						</h:selectOneListbox>年 <h:selectOneListbox id="itemEndMonth" size="1"
							value="#{userManaged.endMonth}">
							<f:selectItems value="#{userManaged.lsItemEndMonth}" />
						</h:selectOneListbox>月 <h:selectOneListbox id="itemEndDay" size="1"
							value="#{userManaged.endDay}">
							<f:selectItems value="#{userManaged.lsItemEndDay}" />
						</h:selectOneListbox>日</td>
					</tr>
					<tr>
						<td class="lbl_left"><h:outputText value=" 点数:" /></td>
						<td align="left"><h:inputText style="txBox" label="点数"
							value="#{userManaged.totalStr}" size="5"
							onfocus="this.style.borderColor='#0066ff';"
							onblur="this.style.borderColor='#aaaaaa';" /></td>
					</tr>
				</table>
				</div>
				</div>
				</td>
			</tr>
		</table>
		<!-- ===========Begin vung button=============== -->
		<div style="padding-left: 200px;">
		<table border="0" cellpadding="4" cellspacing="0" width="300px">
			<tr>
				<td align="center">&nbsp;</td>
				<td><h:commandButton action="#{userManaged.doConfirm}"
					styleClass="btn" value="確認"></h:commandButton>&nbsp;<h:commandButton
					action="#{listUserManaged.doBack}" styleClass="btn" value="戻る"
					immediate="true"></h:commandButton>
				</td>
			</tr>
		</table>
		</div>
	</h:form>
	<!-- End vung input -->
	<jsp:include page="footer.jsp" />
</f:view>